package com.lsy.poi.exception.row;

import org.apache.poi.xssf.usermodel.XSSFRow;

import com.lsy.poi.exception.ParseException;

/**
 * 异常：多个 row 之间，唯一键 冲突
 */
public class UniqueKeyConflictException extends ParseException {

	private static final long serialVersionUID = -2356456431616792547L;

	private static final String ERROR_MSG = " '%s' 和 '%s' 之间存在 '主键冲突'，主键：[%s]=>[%s]";
	
	public UniqueKeyConflictException(XSSFRow row, String arg1, String arg2, String keyName, String uniqueValue) {
		super(row, String.format(ERROR_MSG, arg1, arg2, keyName, uniqueValue));
	}
	
}